<template>
  <div class="container">
    <h2>App组件</h2>
    <Child />
  </div>
</template>

<script>
import {myMixin} from './mixins'
import Child from './components/Child.vue'
export default {
  name: 'App',
  components: {Child},
  // 配置mixin => 将所有mixin中的配置合并到当前组件中来, 但优先考虑自己的
  mixins: [myMixin],

  data () {
    return {
      c: 3
    }
  },
  methods: {
    test2 () {
      console.log('test2()')
    }
  },

  mounted () {
    this.test()
  }
};
</script>
    
